Union-Find and Congruence Closure Algorithms that Produce Proofs

نویسندگان

  • Robert Nieuwenhuis
  • Albert Oliveras
چکیده

Congruence closure algorithms are nowadays central in many modern applications in automated deduction and verification, where it is frequently required to recover the set of merge operations that caused the equivalence of a given pair of terms. For this purpose we study, from the algorithmic point of view, the problem of extracting such small proofs. Union-find data structures maintain the equivalence relation induced by a given sequence of Union operations between pairs of elements. Similarly, congruence closure algorithms maintain a congruence relation given by a sequence of pairs of terms (i.e., equations) without variables. The difference between equivalence closure and congruence closure is that the congruence relation, in addition to reflexivity, symmetry and transitivity, also satisfies the monotonicity axioms saying, for all f , that f(x1 . . . xn)=f(y1 . . . yn) whenever xi=yi for all i in 1 . . . n. Example 0.1 The equation a=b belongs to the congruence generated by the three equations: b=d, f(b)=d, and f(d)=a. 2 Decision procedures based on congruence closure are used in numerous deduction and verification systems, where the generation of proof objects is highly desirable if not required. For instance, this is crucial in the so-called lazy approaches to decision procedures for Boolean formulae over theory atoms. In these decision procedures, the Boolean formulae frequently include equality atoms; see, e.g., [dMR02,BDS02,FJOS03] and CVC, at verify.stanford. edu/CVC. These approaches are lazy in the sense that initially each equality atom is simply abstracted by considering it as a distinct propositional variable, and the resulting propositional formula is sent to a SAT solver. If the SAT solver returns a model that is not a congruence, an additional propositional clause (a lemma) precluding that model is added; this is iterated (many times) until the SAT solver finds a congruence model, or all assignments have been explored. Nieuwenhuis and Oliveras Example 0.2 Assume that, in such a lazy approach, the model being built by the SAT solver is fed into the congruence closure algorithm as a (long!) sequence of atoms that, in particular, includes b=d, f(b) =d, and f(d) = a. Then, if additionally a 6= b is given, it is no longer a congruence (see Example 0.1). At that point, the congruence closure algorithm has to generate as a lemma the clause b=d ∧ f(b)=d ∧ f(d)=a −→ a=b, because the first three atoms are the explanation of a= b. It is hence crucial in these applications to efficiently recover small explanations among the (thousands of) merge operations that have taken place. 2 Another recent approach for the flexible generation of decision procedures is given in [GHN04]. It also heavily relies on incremental congruence closure with intermixed explanation operations. The basic idea is similar to the CLP(X) scheme for constraint logic programming: to provide a clean and efficient integration of specialized theory solvers within the Davis-PutnamLogemann-Loveland procedure [DLL62]. A general engine DPLL(X) is used, where X can be instantiated with a solver for a given theory T , thus producing a system DPLL(T ). Each time the DPLL(T ) procedure produces a conflict, explanations need to be generated by the theory solver for building the conflict graph that is used for non-chronological backtracking in modern SAT solvers such as Chaff [MMZ01]. The fact that this approach currently outperforms previous techniques on logics with equality is largely due to the efficient algorithm for congruence closure with explanations described here (see [GHN04] for details about the DPLL(T ) approach and experiments). We study from the algorithmic point of view the problem of efficiently recovering these explanations, showing that it can be done in quasi-optimal time O(k α(k, k)) for a k-step explanation, without increasing the overall O(n log n) runtime of the fastest known congruence closure algorithms. As far as we know, this had not been done before, although several authors have addressed the problem of how to describe congruence closure proofs in different logical formats (see, e.g., [SD99]), and others have addressed union-find with different extensions such as backtracking.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Implementation of a Fast Congruence Closure Algorithm

In this paper an abstract algorithm for computing the congruence closure of a set of ground equations using the standard union-find infrastructure is given as well as an abstract algorithm that decides whether a ground equation is a semantic consequence of a set of ground equations using the output of the congruence closure algorithm. Furthermore an efficient C++ implementation of both algorith...

متن کامل

Proof-Producing Congruence Closure

Many applications of congruence closure nowadays require the ability of recovering, among the thousands of input equations, the small subset that caused the equivalence of a given pair of terms. For this purpose, here we introduce an incremental congruence closure algorithm that has an additional Explain operation. First, two variations of union-find data structures with Explain are introduced....

متن کامل

Justifying Equality

We consider the problem of finding irredundant bases for inconsistent sets of equalities and disequalities. These are subsets of inconsistent sets which do not contain any literals which do not contribute to the unsatisfiability in an essential way, and can therefore be discarded. The approach we are pursuing here is to decorate derivations with proofs and to extract irredundant sets of assumpt...

متن کامل

Fast congruence closure and extensions

Congruence closure algorithms for deduction in ground equational theories are ubiquitous in many (semi-) decision procedures used for verification and automated deduction. In many of these applications one needs an incremental algorithm that is moreover capable of recovering, among the thousands of input equations, the small subset that explains the equivalence of a given pair of terms. In this...

متن کامل

Congruence Closure in Intensional Type Theory

Congruence closure procedures are used extensively in automated reasoning and are a core component of most satisfiability modulo theories solvers. However, no known congruence closure algorithms can support any of the expressive logics based on intensional type theory (ITT), which form the basis of many interactive theorem provers. The main source of expressiveness in these logics is dependent ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004